package com.example.animalcase;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class BrowerIntentWebActivity extends AppCompatActivity {

    private EditText mEditTextUri;
    private Button mButtonBrowerIntentWeb;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_brower_intent_web);

        mEditTextUri=(EditText)findViewById(R.id.editText_uri);
        mButtonBrowerIntentWeb=(Button)findViewById(R.id.button_brower);
    }
    public void onClickBrowerIntentWeb(View view){
        Uri uriBrower=Uri.parse(mEditTextUri.getText().toString());
        BrowerIntentWebActivity.this.startActivity(new Intent(Intent.ACTION_VIEW,uriBrower));
    }
}
